//
//  ZJTabBarViewController.m
//  iosFramework
//
//  Created by Farben on 2020/8/5.
//  Copyright © 2020 Farben. All rights reserved.
//

#import "ZJTabBarViewController.h"
#import "ZJMainViewController.h"
#import "ZJRTRootNavigationController.h"
#import "ZJPersonalPageViewController.h"

@interface ZJTabBarViewController ()

@end

@implementation ZJTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    ZJMainViewController *mainVC = [[ZJMainViewController alloc]init];
    ZJRTRootNavigationController *mainNav = [[ZJRTRootNavigationController alloc]initWithRootViewController:mainVC];
    mainNav.tabBarItem.selectedImage = [UIImage imageNamed:@"tab_recent_press.png"];
    mainNav.tabBarItem.image = [UIImage imageNamed:@"tab_recent_nor.png"];
    mainNav.title = @"资讯";
    
    ZJPersonalPageViewController *personVC = [[ZJPersonalPageViewController alloc]init];
    ZJRTRootNavigationController *oersonNav = [[ZJRTRootNavigationController alloc]initWithRootViewController:personVC];
    oersonNav.tabBarItem.selectedImage = [UIImage imageNamed:@"tab_recent_press.png"];
    oersonNav.tabBarItem.image = [UIImage imageNamed:@"tab_recent_nor.png"];
    oersonNav.title = @"个人中心";
    
    self.viewControllers =@[mainNav,oersonNav];
//    self.tabBar.tintColor = uicolo;
    self.tabBar.backgroundColor = [UIColor whiteColor];
    //设置导航栏背景色和文字颜色
//    [[UINavigationBar appearance] setBarTintColor:AppMainColor];
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    self.tabBar.translucent = NO;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
